package com.aaa.mbs.service;

import com.aaa.common.bo.Coupon;
import com.aaa.common.bo.CouponHistory;
import com.aaa.common.util.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * (CouponHistory)表服务接口
 *
 * @author makejava
 * @since 2020-12-14 11:51:39
 */
@FeignClient("marketService")
public interface RemoteCouponHistoryService {

       /**
     * 远程向会员优惠券历史添加数据
     * @param couponHistory
     * @return
     */
    @PostMapping("/couponHistory/insert")
    Result insert(@RequestBody CouponHistory couponHistory);

    /**
     * 远程向会员优惠券历史修改数据
     * @param couponHistory
     * @return
     */
    @PutMapping("/couponHistory/update")
    Result update(@RequestBody CouponHistory couponHistory);

    /**
     * 根据会员编号或者店铺ID获取该会员的所有可用优惠券
     * @param
     * @return
     */
    /*@PostMapping("/couponHistory/getCouponListByMemberId")
    List<Coupon>  getCouponListByMemberId(@RequestBody CouponHistory couponHistory);
    */

    @GetMapping("/couponHistory/getCouponListByMemberId")
    List<Coupon>  getCouponListByMemberId(@RequestParam("shopId") Long shopId, @RequestParam("memberId") Long memberId);
    /**
     * 远程向会员优惠券历史添加数据
     * @param coupon
     * @return
     */
    @PutMapping("/coupon/update")
    Result update(@RequestBody Coupon coupon);
}